package com.ruoyi.videos.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.videos.mapper.CourseVideosMapper;
import com.ruoyi.videos.domain.CourseVideos;
import com.ruoyi.videos.service.ICourseVideosService;

/**
 * 课程视频Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-03
 */
@Service
public class CourseVideosServiceImpl implements ICourseVideosService 
{
    @Autowired
    private CourseVideosMapper courseVideosMapper;

    /**
     * 查询课程视频
     * 
     * @param videoId 课程视频主键
     * @return 课程视频
     */
    @Override
    public CourseVideos selectCourseVideosByVideoId(Long videoId)
    {
        return courseVideosMapper.selectCourseVideosByVideoId(videoId);
    }

    /**
     * 查询课程视频列表
     * 
     * @param courseVideos 课程视频
     * @return 课程视频
     */
    @Override
    public List<CourseVideos> selectCourseVideosList(CourseVideos courseVideos)
    {
        return courseVideosMapper.selectCourseVideosList(courseVideos);
    }

    /**
     * 新增课程视频
     * 
     * @param courseVideos 课程视频
     * @return 结果
     */
    @Override
    public int insertCourseVideos(CourseVideos courseVideos)
    {
        return courseVideosMapper.insertCourseVideos(courseVideos);
    }

    /**
     * 修改课程视频
     * 
     * @param courseVideos 课程视频
     * @return 结果
     */
    @Override
    public int updateCourseVideos(CourseVideos courseVideos)
    {
        return courseVideosMapper.updateCourseVideos(courseVideos);
    }

    /**
     * 批量删除课程视频
     * 
     * @param videoIds 需要删除的课程视频主键
     * @return 结果
     */
    @Override
    public int deleteCourseVideosByVideoIds(Long[] videoIds)
    {
        return courseVideosMapper.deleteCourseVideosByVideoIds(videoIds);
    }

    /**
     * 删除课程视频信息
     * 
     * @param videoId 课程视频主键
     * @return 结果
     */
    @Override
    public int deleteCourseVideosByVideoId(Long videoId)
    {
        return courseVideosMapper.deleteCourseVideosByVideoId(videoId);
    }
}
